package com.cf.super_hero.controller;

import com.cf.super_hero.serve.impl.PrimaryPageService;
import com.cf.super_hero.tools.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
public class PrimaryPageControl {

    @Autowired
    private PrimaryPageService primaryPageService;
    @GetMapping("/allImg")
    public Result getHeroData(){

        return Result.success(primaryPageService.getHeroData());
    }
}
